/***********************************************************************
 * Module:  NguyenLieu.cs
 * Author:  Tuan Nguyen
 * Purpose: Definition of the Class NguyenLieu
 ***********************************************************************/

using System;

public class NguyenLieu
{
   public long MaNguyenLieu;
   public string TenNguyenLieu;
   public long DonGia;
   public string DonViTinh;
   
   public System.Collections.ArrayList ChiTietKhoNguyenLieu;
   public System.Collections.ArrayList chiTietPhieuXuatKho;
   
   /// <pdGenerated>default getter</pdGenerated>
   public System.Collections.ArrayList GetChiTietPhieuXuatKho()
   {
      if (chiTietPhieuXuatKho == null)
         chiTietPhieuXuatKho = new System.Collections.ArrayList();
      return chiTietPhieuXuatKho;
   }
   
   /// <pdGenerated>default setter</pdGenerated>
   public void SetChiTietPhieuXuatKho(System.Collections.ArrayList newChiTietPhieuXuatKho)
   {
      RemoveAllChiTietPhieuXuatKho();
      foreach (ChiTietPhieuXuatKho oChiTietPhieuXuatKho in newChiTietPhieuXuatKho)
         AddChiTietPhieuXuatKho(oChiTietPhieuXuatKho);
   }
   
   /// <pdGenerated>default Add</pdGenerated>
   public void AddChiTietPhieuXuatKho(ChiTietPhieuXuatKho newChiTietPhieuXuatKho)
   {
      if (newChiTietPhieuXuatKho == null)
         return;
      if (this.chiTietPhieuXuatKho == null)
         this.chiTietPhieuXuatKho = new System.Collections.ArrayList();
      if (!this.chiTietPhieuXuatKho.Contains(newChiTietPhieuXuatKho))
      {
         this.chiTietPhieuXuatKho.Add(newChiTietPhieuXuatKho);
         newChiTietPhieuXuatKho.SetNguyenLieu(this);      
      }
   }
   
   /// <pdGenerated>default Remove</pdGenerated>
   public void RemoveChiTietPhieuXuatKho(ChiTietPhieuXuatKho oldChiTietPhieuXuatKho)
   {
      if (oldChiTietPhieuXuatKho == null)
         return;
      if (this.chiTietPhieuXuatKho != null)
         if (this.chiTietPhieuXuatKho.Contains(oldChiTietPhieuXuatKho))
         {
            this.chiTietPhieuXuatKho.Remove(oldChiTietPhieuXuatKho);
            oldChiTietPhieuXuatKho.SetNguyenLieu((NguyenLieu)null);
         }
   }
   
   /// <pdGenerated>default removeAll</pdGenerated>
   public void RemoveAllChiTietPhieuXuatKho()
   {
      if (chiTietPhieuXuatKho != null)
      {
         System.Collections.ArrayList tmpChiTietPhieuXuatKho = new System.Collections.ArrayList();
         foreach (ChiTietPhieuXuatKho oldChiTietPhieuXuatKho in chiTietPhieuXuatKho)
            tmpChiTietPhieuXuatKho.Add(oldChiTietPhieuXuatKho);
         chiTietPhieuXuatKho.Clear();
         foreach (ChiTietPhieuXuatKho oldChiTietPhieuXuatKho in tmpChiTietPhieuXuatKho)
            oldChiTietPhieuXuatKho.SetNguyenLieu((NguyenLieu)null);
         tmpChiTietPhieuXuatKho.Clear();
      }
   }
   public System.Collections.ArrayList NccNguyenLieu;
   public System.Collections.ArrayList CongThucBanh;

}